<!DOCTYPE html>
<html lang="ar">
<head>
	<?php $this->load->helper('url');?>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    
	<link href="<?php echo base_url("assets/css/webfonts/amiri/amiri_test.css")?>" rel="stylesheet" type="text/css" />
	<link href="<?php echo base_url("assets/css/ch_menu.css")?>" rel="stylesheet" type="text/css" />
	
	<meta charset="utf-8">
	<title>مرحبا بكم في برنامج تسيير الإقامة الجامعية 3000 سرير</title>
	
</head>
<body>
<div style="color:#ff0000">test aaaaaaaaaaaaaaaaaaaaaa  </div>
 <a href="aaaa"> click here </a>
<?php
// include_once('header.php');
	
	define('LAST_CAPITRE_ID',19);
	define('LAST_ARTICLE_CODE',3);
	 
	$chcl = $charticle['charticle'];  
	$frns=$fournisseur['fournisseur'];
?>
<div class="container">
	
<div class = "charticle_browser">
	
<ul class="topmenu" id="css3menu1">
<?php
$chcl = $charticle['charticle']; 
$mem =0;


for($i = 0; $i < count($chcl); $i++)
{
	if($mem <> $chcl[$i]->id_chapitre)
			{	
				echo('<li class="topmenu"><a style="width:248px;" href="#"><span><img alt="" src="images/sparkle-brown-vertical/info2.png">'. $chcl[$i]->nom_chap.' '.$chcl[$i]->id_chapitre.'- </span></a>');
				echo('<div style="auto;" class="submenu">');
				echo('<div style="width:100%" class="column">');
				echo('<ul><li><a href="'.base_url("controller/method").'/'.$chcl[$i]->id_article.'"><img alt="" src="images/sparkle-brown-vertical/bookmarks.png">'.$chcl[$i]->code.'- '.$chcl[$i]->nom_art.'</a></li><br>');
				if(($chcl[$i]->code)== 1 && ($chcl[$i]->id_chapitre == 16))  echo('</ul></div></div></li>'); // patch to fix a unique child
				
			}
			else
			{
				echo('<li><a href="'.base_url("controller/method").'/'.$chcl[$i]->id_article.'"><img alt="" src="images/sparkle-brown-vertical/bookmarks.png">'.$chcl[$i]->code.'- '.$chcl[$i]->nom_art.'</a></li><br>');
				if($chcl[$i+1]->id_chapitre > $mem) echo('</ul></div></div></li>');
				if(($chcl[$i]->code)== 2 && ($chcl[$i]->id_chapitre == 19))  //if last chapitre et article
				 {
				 	echo('<li><a href="'.base_url("controller/method").'/'.$chcl[$i]->id_article.'"><img alt="" src="images/sparkle-brown-vertical/bookmarks.png">'.$chcl[$i]->code.'- '.$chcl[$i+1]->nom_art.'</a></li><br>');
				 	 echo('</ul></div></div></li>');
					//goto end;
					break;
				 }
			}
			    $mem = $chcl[$i]->id_chapitre;	
}		
///end: 
//$ooo=555;
 ?>
 </ul>
 
</div>

<div class="main_div" style="font-family: 'Amiri', serif;"> main div here هذا خط جميل </div>

</div>
 
</body>
</html>